/**
 * Created by fandongyang on 2017/7/26.
 */
import React, {Component} from 'react';
import {
    AppRegistry,
} from 'react-native';
import configureStore from './store/configStore';

const store = configureStore();
import {Provider} from 'react-redux';
import SplashScreen from 'react-native-splash-screen'
import './common/Global';
import request from './common/request';
import App from './App';

global.request = request;

if (!__DEV__) {
    global.console = {
        info: () => {
        },
        log: () => {
        },
        warn: () => {
        },
        error: () => {
        },
    };
}
export default class Root extends Component {
    componentDidMount() {
        SplashScreen.hide();
    }


    render() {
        return (
            <Provider store={store}>
                <App/>
            </Provider>
        )
    }
}
/*console.disableYellowBox = true;*/
console.ignoredYellowBox = ['Warning: BackAndroid is deprecated.  Please use BackHandler instead.',
    'source.uri should not be an empty string'
];
// global.BASEURL = 'hahaha';
// 关闭全部的警告
console.disableYellowBox = true;
// 关闭指定的警告
console.warn('YellowBox is disabled.');


AppRegistry.registerComponent('ET', () => Root);
